3.382 \(\int \sqrt{\frac{a+b x}{x^2}} \, dx\)

Optimal. Leaf size=51 \[ 2 x \sqrt{\frac{a}{x^2}+\frac{b}{x}}-2 \sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a}}{x \sqrt{\frac{a}{x^2}+\frac{b}{x}}}\right ) \]

[Out]

2*Sqrt[a/x^2 + b/x]*x - 2*Sqrt[a]*ArcTanh[Sqrt[a]/(Sqrt[a/x^2 + b/x]*x)]

_______________________________________________________________________________________

Rubi [A]  time = 0.125978, antiderivative size = 51, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.385 \[ 2 x \sqrt{\frac{a}{x^2}+\frac{b}{x}}-2 \sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a}}{x \sqrt{\frac{a}{x^2}+\frac{b}{x}}}\right ) \]

Antiderivative was successfully verified.

[In]  Int[Sqrt[(a + b*x)/x^2],x]

[Out]

2*Sqrt[a/x^2 + b/x]*x - 2*Sqrt[a]*ArcTanh[Sqrt[a]/(Sqrt[a/x^2 + b/x]*x)]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 8.51486, size = 41, normalized size = 0.8 \[ - 2 \sqrt{a} \operatorname{atanh}{\left (\frac{\sqrt{a}}{x \sqrt{\frac{a}{x^{2}} + \frac{b}{x}}} \right )} + 2 x \sqrt{\frac{a}{x^{2}} + \frac{b}{x}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(((b*x+a)/x**2)**(1/2),x)

[Out]

-2*sqrt(a)*atanh(sqrt(a)/(x*sqrt(a/x**2 + b/x))) + 2*x*sqrt(a/x**2 + b/x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0456024, size = 58, normalized size = 1.14 \[ \frac{2 x \sqrt{\frac{a+b x}{x^2}} \left (\sqrt{a+b x}-\sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a+b x}}{\sqrt{a}}\right )\right )}{\sqrt{a+b x}} \]

Antiderivative was successfully verified.

[In]  Integrate[Sqrt[(a + b*x)/x^2],x]

[Out]

(2*x*Sqrt[(a + b*x)/x^2]*(Sqrt[a + b*x] - Sqrt[a]*ArcTanh[Sqrt[a + b*x]/Sqrt[a]]
))/Sqrt[a + b*x]

_______________________________________________________________________________________

Maple [A]  time = 0.01, size = 47, normalized size = 0.9 \[ 2\,{\frac{x}{\sqrt{bx+a}}\sqrt{{\frac{bx+a}{{x}^{2}}}} \left ( -\sqrt{a}{\it Artanh} \left ({\frac{\sqrt{bx+a}}{\sqrt{a}}} \right ) +\sqrt{bx+a} \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(((b*x+a)/x^2)^(1/2),x)

[Out]

2*((b*x+a)/x^2)^(1/2)*x*(-a^(1/2)*arctanh((b*x+a)^(1/2)/a^(1/2))+(b*x+a)^(1/2))/
(b*x+a)^(1/2)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt((b*x + a)/x^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.23282, size = 1, normalized size = 0.02 \[ \left [2 \, x \sqrt{\frac{b x + a}{x^{2}}} + \sqrt{a} \log \left (\frac{b x - 2 \, \sqrt{a} x \sqrt{\frac{b x + a}{x^{2}}} + 2 \, a}{x}\right ), 2 \, x \sqrt{\frac{b x + a}{x^{2}}} - 2 \, \sqrt{-a} \arctan \left (\frac{x \sqrt{\frac{b x + a}{x^{2}}}}{\sqrt{-a}}\right )\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt((b*x + a)/x^2),x, algorithm="fricas")

[Out]

[2*x*sqrt((b*x + a)/x^2) + sqrt(a)*log((b*x - 2*sqrt(a)*x*sqrt((b*x + a)/x^2) +
2*a)/x), 2*x*sqrt((b*x + a)/x^2) - 2*sqrt(-a)*arctan(x*sqrt((b*x + a)/x^2)/sqrt(
-a))]

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \sqrt{\frac{a + b x}{x^{2}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(((b*x+a)/x**2)**(1/2),x)

[Out]

Integral(sqrt((a + b*x)/x**2), x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.222044, size = 88, normalized size = 1.73 \[ 2 \,{\left (\frac{a \arctan \left (\frac{\sqrt{b x + a}}{\sqrt{-a}}\right )}{\sqrt{-a}} + \sqrt{b x + a}\right )}{\rm sign}\left (x\right ) - \frac{2 \,{\left (a \arctan \left (\frac{\sqrt{a}}{\sqrt{-a}}\right ) + \sqrt{-a} \sqrt{a}\right )}{\rm sign}\left (x\right )}{\sqrt{-a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt((b*x + a)/x^2),x, algorithm="giac")

[Out]

2*(a*arctan(sqrt(b*x + a)/sqrt(-a))/sqrt(-a) + sqrt(b*x + a))*sign(x) - 2*(a*arc
tan(sqrt(a)/sqrt(-a)) + sqrt(-a)*sqrt(a))*sign(x)/sqrt(-a)